
/// MLSDEFORMER source code
/// by Alvaro Cuno, LCG-COPPE-UFRJ 
/// bugs? email-me: alvaroecp@gmail.com
/// January, 2007

#ifndef __WEIGHTS_SCHEME_H__
#define __WEIGHTS_SCHEME_H__
   
#include "../typedefs.h"
#include "../core/constraints.h"
#include "mesh.h"
#include "meshWithSkeleton.h"
   
//~ namespace MLS {
   
/// Computes the weight table using a path-based metric over the mesh
/// @param model the mesh model 
/// @param constraints the constraints
/// @return a pointer to the weights table
Number* compute_WeightsTable(Mesh *model, const Constraints *constraints);

/// Computes the weight table using a metric over the mesh
/// The constraints are interpreted as trihedron constraints
/// A trihedron is composed of one quadruple of constraints
/// @param model the shape with skeleton 
/// @param constraints the constraints
/// @return a pointer to the weights table
Number* compute_WeightsTable_Trihedrons(Mesh *model, const Constraints *constraints);
   
/// Computes the weight table using a path-based metric over the skeleton
/// @param model the shape with skeleton 
/// @param constraints the constraints
/// @return a pointer to the weights table
Number* compute_WeightsTable(MeshWithSkeleton *model, const Constraints *constraints);
   
/// Computes a distance table using a path-based metric over the skeleton
/// @param model the shape with skeleton 
/// @param constraints the constraints
/// @return a pointer to the weights table
Number* compute_DistancesTable(MeshWithSkeleton *model, const Constraints *constraints);

/// Computes the weight table using a metric over the skeleton.
/// The constraints are interpreted as trihedron constraints.
/// A trihedron is composed of one quadruple of constraints
/// @param model the shape with skeleton 
/// @param constraints the constraints
/// @return a pointer to the weights table
Number* compute_WeightsTable_Trihedrons(MeshWithSkeleton *model, const Constraints *constraints);

/// Computes the weights table using a path-based metric over a skeleton
/// @param model the shape with skeleton 
/// @param skeleton the skeleton
/// @return a pointer to the weights table
Number* compute_WeightsTable(Mesh *model, Skeleton *skeleton, const Constraints *constraints);

/// Computes the weights table using a path-based metric over a skeleton
/// and considering a virtual skeleton each time
/// @param model the shape with skeleton 
/// @param skeleton the skeleton
/// @return a pointer to the weights table
Number* compute_WeightsTable2(MeshWithSkeleton *model, const Constraints *constraints);

//~ } // end MLS namespace
   
#endif
